<?php

declare (strict_types=1);

namespace app\validate;

use think\Validate;

/**
 * 登录校验
 *
 * @author RenLiang Sun
 */
class Login extends Validate
{

    /**
     * 规则
     */
    protected $rule = [
        'account' => 'require|alpha|length:5,15',
        'password' => 'require|alphaNum|length:5,20'
    ];

    /**
     * 场景
     */
    protected $scene = [
        'login' => ['account', 'password']
    ];

    /**
     * 字段描述信息
     */
    protected $field = [
        'account' => '账户',
        'password' => '密码'
    ];

}
